var six7        = require('six7')
,   config      = require('./config')
,   routes      = require('./routes')
,   six7Cookies = six7.cookies
,   error       = six7.error
,   view        = config.View
,   animates    = config.Animates
,   app         = six7();

app.loading.hide();

app.set("App name", config.AppName);                //设置app名字
app.set("App home", config.AppHome);                //设置首页
app.set("Views", config.ViewPath);                  //设置模板路径
app.set("Page switch animates", animates());        //设置默认切换动画

app.engine("html", view);                           //设置模板引擎
app.use(six7Cookies());                             //cookies
routes.call(app);                                   //路由
app.use(error());                                   //错误处理
app.start();                                        //开始程序